<template>
	<view class="news-info">
		<view class="name">{{newsInfo.name}}</view>
		<view class="time">
			<view class="click"><u-icon name="eye" color="#ccc" size="32" style="margin-right: 6rpx;"></u-icon>{{newsInfo.click}}</view>
			<view class="date">{{newsInfo.add_time}}</view>
		</view>
		<view class="content">
			<u-parse :html="newsInfo.content"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				information_id: '',
				newsInfo: ''
			}
		},
		onLoad(options) {
			this.information_id = options.information_id
			this.init()
		},
		methods: {
			async init(){
				let res = await this.$u.api.informationInfo({information_id: this.information_id})
				this.newsInfo = res.datas
			}
		}
	}
</script>

<style lang="scss" scoped>
	.news-info{
		padding: 30rpx;
		.name{
			font-size: 34rpx;
			font-weight: bold;
		}
		.time{
			display: flex;
			align-items: center;
			margin-top: 19rpx;
			color: #ccc;
			font-size: 20rpx;
			.click{
				display: flex;
				align-items: center;
			}
			.date{
				margin-left: 16rpx;
			}
		}
		.content{
			margin-top: 30rpx;
		}
	}
</style>
